package com.ayitubie.refuelweb.config.websocket;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/api/test")
@Slf4j
public class TestController {

    @Autowired
    private SendOnlineCount sendOnlineCount;

    /**
     * 启动页面
     *
     * @return
     */
    @GetMapping("/start")
    public String start() {
        return "index";
    }

    @GetMapping("/pushToWeb")
    public void pushToWeb() {
        sendOnlineCount.sendCountNum();
    }
}


